package com.ruoyi.web.controller.shop;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.RestaurantOrder;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.service.RestaurantOrderService;
import com.ruoyi.system.service.req.CreateOrderDTO;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: ruohao
 * @Date: 2023/8/12
 **/

@RestController
@RequestMapping("/shop/order")
public class OrderController extends BaseController {

	private static final Logger log = LoggerFactory.getLogger(OrderController.class);

	@Resource
	private RestaurantOrderService orderService;

	public TableDataInfo listNormalOrder(RestaurantOrder order) {
		startPage();
		orderService.getNormalOrder();
		return null;
	}

	@ApiOperation("创建订单")
	//("@ss.hasPermi('pay:customer:balance')")
	@PostMapping("/createOrder")
	public AjaxResult makeOrder(@Validated @RequestBody CreateOrderDTO createOrderDTO) {
		return success();
	}


}
